<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<style>
.pf-row {
	margin-bottom: 5px;
}

.pf-row  label {
	display: inline-block;
	width: 30%;
	text-align: right;
}
</style>
<div class="modal fade" data-backdrop="static" id="pf-add-block-modal">
    <div class="modal-dialog ">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"></button>
                <h3 id="pf-modal-title">添加</h3>
            </div>
            <div class="modal-body">
                <form id="pf-block-save-form" action="/manage/block/save" method="post" enctype="multipart/form-data">
                    <input type="hidden" class="form-control" placeholder="id" name="id" value="${blockEntity.id}" id="id" />
                    <div class="pf-row">
                        <label> <span class="red">*</span> 推荐位名称：
                        </label> <input type="text" class="form-control" style="display: inline-block; width: 50%" placeholder="推荐位名称" name="title" value="${blockEntity.title}" />
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 页面:
                        </label> <select id="pf-select-page" class="form-control" style="display: inline-block; width: 30%" name="pageId">
                        </select>
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 类型:
                        </label> <select id="pf-select-type" class="form-control" style="display: inline-block; width: 30%" name="from">
                            <option value="designer">设计师</option>
                            <option value="company">公司</option>
                            <option value="shop">商家</option>
                            <option value="youhui">优惠信息</option>
                            <option value="news">公司新闻</option>
                            <option value="product">商品</option>
                            <option value="coupon">优惠券</option>
                            <option value="home">小区</option>
                            <option value="tuan">小区团装</option>
                            <option value="site">工地</option>
                            <option value="case">案例</option>
                            <option value="diary">日记</option>
                            <option value="ask">问答</option>
                            <option value="article">文章</option>
                            <option value="activity">活动</option>
                        </select>
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 调用:
                        </label> <select id="pf-select-tmpl" class="form-control" style="display: inline-block; width: 30%" name="type">
                            <option value="default">默认排序</option>
                            <option value="hot">热度优先</option>
                            <option value="new">最新有限</option>
                        </select>
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 调用条数:
                        </label> <input type="text" class="form-control" style="display: inline-block; width: 30%" placeholder="调用条数" name="limit" value="${blockEntity.limit}" />
                        推荐位最大数量，数值范围 0~255
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 缓存周期:
                        </label> <select id="pf-select-ttl" class="form-control" style="display: inline-block; width: 30%" name="ttl">
                            <option value="900">15分钟</option>
                            <option value="1800">30分钟</option>
                            <option value="3600">1小时</option>
                            <option value="21600">6小时</option>
                            <option value="43200">12小时</option>
                            <option value="86400" selected="selected">24小时</option>
                            <option value="0">永不过期</option>
                            <option value="-1">不缓存</option>
                        </select>
                    </div>
                    <div class="pf-row">
                        <label> 排序:
                        </label> <input type="text" class="form-control" style="display: inline-block; width: 30%" placeholder="排序" name="orderby" value="${blockEntity.orderby}" />
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn">关闭</button>
                <button type="button" class="btn btn-primary pf-submit" id="pf-submit">提交</button>
            </div>
        </div>
    </div>
</div>
